{% extends "base.html" %}
{% load i18n %}
	{% block title %}{% trans "User registration" %}{% endblock %}
{% block customjs %}
	<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.registration.js"></script>
{% endblock %}

{% block content %}
<h1>{% trans "User registration" %}</h1>
<p class="intro">{% trans "Joining this community is quick and easy. You only need to fill the following information to get access to the all the private content." %}</p>
<div class="center">
	<form class="commonform registration" method="post" action="">
		<fieldset>
			<div>
   			<label for="id_username">{% trans "Username:" %}</label>
   			{{ form.username }}
				<img id="username_img" src="{{ MEDIA_URL }}images/loading.gif" />
			</div>
			{% if email %}
			<div>
   			<label for="id_email">{% trans "E-mail:" %}</label>
   			{{ form.email }}
				<img id="email_img" src="{{ MEDIA_URL }}images/loading.gif" />
			</div>
			{% endif %}
			<div>
   			<label for="id_password1">{% trans "Password:" %}</label>
   			{{ form.password1 }}
			</div>
			<div>
   			<label for="id_password2">{% trans "Password again:" %}</label>
   			{{ form.password2 }}
				<img id="password_img" src="{{ MEDIA_URL }}images/loading.gif" />
			</div>
   		<input type="submit" value="{% trans 'Register' %}" />
		</fieldset>
  	{% if form.errors %}
			{% for error,desc in form.errors.items %}
  			<p class="error">{{ error }}: {{desc|join:","}}</p>
			{% endfor %}
  	{% endif %}
	</form> 
</div>
{% endblock %}
